package me.leiusual.sharing.pref

import android.content.Context
import me.leiusual.sharing.pref.impl.KDelegate
import javax.inject.Inject
import javax.inject.Singleton

/**
 * author: leiusual
 * create on: 2018/10/15
 * description:
 */
@Singleton
class User @Inject constructor(
    context: Context
) : AbstractPref(context) {

  var userId: Long by KDelegate.KLong(sp)
  var userIdInClient: Long by KDelegate.KLong(sp)
  var clientId: String? by KDelegate.KString(sp)
  var username: String? by KDelegate.KString(sp)
  var nickname: String? by KDelegate.KString(sp)
  var realName: String? by KDelegate.KString(sp)
  var birthday: String? by KDelegate.KString(sp)
  var idCard: String? by KDelegate.KString(sp)
  var avatar: String? by KDelegate.KString(sp)
  var password: String? by KDelegate.KString(sp)
  var email: String? by KDelegate.KString(sp)
  var emailEnabled: Boolean by KDelegate.KBoolean(sp)
  var mobile: String? by KDelegate.KString(sp)
  var mobileEnabled: Boolean by KDelegate.KBoolean(sp)
  var externalCode: String? by KDelegate.KString(sp)
  var introducerCode: String? by KDelegate.KString(sp)
  var starLevel: Int by KDelegate.KInt(sp)
  var userType: String? by KDelegate.KString(sp)
  var enabled: Boolean by KDelegate.KBoolean(sp)
  var accountNonExpired: Boolean by KDelegate.KBoolean(sp)
  var accountNonLocked: Boolean by KDelegate.KBoolean(sp)
  var credentialsNonExpired: Boolean by KDelegate.KBoolean(sp)
}